home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form frmItemProperties
- BorderStyle = 1 'Fixed Single
- Caption = "Item Properties"
- ClientHeight = 4392
- ClientLeft = 804
- ClientTop = 708
- ClientWidth = 8016
- Height = 4764
- Left = 756
- LinkTopic = "Form3"
- ScaleHeight = 4392
- ScaleWidth = 8016
- Top = 384
- Width = 8112
- Begin TextBox edtItemHeight
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 360
- Left = 3120
- TabIndex = 69
- Top = 1560
- Width = 852
- End
- Begin TextBox edtItemWidth
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 360
- Left = 1080
- TabIndex = 68
- TabStop = 0 'False
- Top = 1560
- Width = 852
- End
- Begin CheckBox chkItemDrawLabel
- Caption = "Draw"
- Height = 252
- Left = 240
- TabIndex = 67
- Top = 360
- Width = 792
- End
- Begin Frame Frame4
- Caption = "Graphic Alignment"
- Height = 1332
- Left = 4020
- TabIndex = 54
- Top = 2520
- Width = 3912
- Begin Frame Frame7
- Caption = "Vertical"
- Height = 1092
- Left = 2844
- TabIndex = 63
- Top = 156
- Width = 972
- Begin OptionButton btnGraphicPosV
- Caption = "Top"
- Height = 252
- Index = 0
- Left = 60
- TabIndex = 66
- Top = 300
- Width = 732
- End
- Begin OptionButton btnGraphicPosV
- Caption = "Middle"
- Height = 252
- Index = 1
- Left = 60
- TabIndex = 65
- Top = 540
- Value = -1 'True
- Width = 852
- End
- Begin OptionButton btnGraphicPosV
- Caption = "Bottom"
- Height = 252
- Index = 2
- Left = 60
- TabIndex = 64
- Top = 780
- Width = 852
- End
- End
- Begin Frame Frame5
- Caption = "Horizontal"
- Height = 1092
- Left = 1764
- TabIndex = 59
- Top = 156
- Width = 1032
- Begin OptionButton btnGraphicPosH
- Caption = "Right"
- Height = 252
- Index = 2
- Left = 60
- TabIndex = 62
- Top = 780
- Width = 852
- End
- Begin OptionButton btnGraphicPosH
- Caption = "Center"
- Height = 252
- Index = 1
- Left = 60
- TabIndex = 61
- Top = 540
- Value = -1 'True
- Width = 852
- End
- Begin OptionButton btnGraphicPosH
- Caption = "Left"
- Height = 252
- Index = 0
- Left = 60
- TabIndex = 60
- Top = 300
- Width = 792
- End
- End
- Begin TextBox txtItemGraphicLeft
- Height = 312
- Left = 264
- TabIndex = 58
- Top = 456
- Width = 552
- End
- Begin TextBox txtItemGraphicWidth
- Height = 312
- Left = 1110
- TabIndex = 57
- Top = 456
- Width = 552
- End
- Begin TextBox txtItemGraphicTop
- Height = 312
- Left = 264
- TabIndex = 56
- Top = 816
- Width = 552
- End
- Begin TextBox txtItemGraphicHeight
- Height = 312
- Left = 1110
- TabIndex = 55
- Top = 816
- Width = 552
- End
- Begin Label Label19
- Alignment = 1 'Right Justify
- Caption = "L:"
- Height = 252
- Left = 60
- TabIndex = 33
- Top = 492
- Width = 192
- End
- Begin Label Label18
- Alignment = 1 'Right Justify
- Caption = "W:"
- Height = 252
- Left = 840
- TabIndex = 34
- Top = 492
- Width = 252
- End
- Begin Label Label17
- Alignment = 1 'Right Justify
- Caption = "T:"
- Height = 252
- Left = 60
- TabIndex = 35
- Top = 852
- Width = 192
- End
- Begin Label Label16
- Alignment = 1 'Right Justify
- Caption = "H:"
- Height = 252
- Left = 840
- TabIndex = 36
- Top = 852
- Width = 252
- End
- End
- Begin Frame Frame6
- Caption = "Text Alignment"
- Height = 1332
- Left = 4020
- TabIndex = 37
- Top = 1140
- Width = 3912
- Begin TextBox txtItemTextHeight
- Height = 312
- Left = 1104
- TabIndex = 53
- Top = 816
- Width = 552
- End
- Begin TextBox txtItemTextTop
- Height = 312
- Left = 264
- TabIndex = 51
- Top = 816
- Width = 552
- End
- Begin TextBox txtItemTextWidth
- Height = 312
- Left = 1104
- TabIndex = 49
- Top = 456
- Width = 552
- End
- Begin TextBox txtItemTextLeft
- Height = 312
- Left = 264
- TabIndex = 47
- Top = 456
- Width = 552
- End
- Begin Frame Frame2
- Caption = "Horizontal"
- Height = 1092
- Left = 1764
- TabIndex = 42
- Top = 156
- Width = 1032
- Begin OptionButton btnTextPosH
- Caption = "Left"
- Height = 252
- Index = 0
- Left = 60
- TabIndex = 45
- Top = 300
- Width = 792
- End
- Begin OptionButton btnTextPosH
- Caption = "Center"
- Height = 252
- Index = 1
- Left = 60
- TabIndex = 44
- Top = 540
- Value = -1 'True
- Width = 852
- End
- Begin OptionButton btnTextPosH
- Caption = "Right"
- Height = 252
- Index = 2
- Left = 60
- TabIndex = 43
- Top = 780
- Width = 852
- End
- End
- Begin Frame Frame3
- Caption = "Vertical"
- Height = 1092
- Left = 2844
- TabIndex = 38
- Top = 156
- Width = 972
- Begin OptionButton btnTextPosV
- Caption = "Bottom"
- Height = 252
- Index = 2
- Left = 60
- TabIndex = 41
- Top = 780
- Width = 852
- End
- Begin OptionButton btnTextPosV
- Caption = "Middle"
- Height = 252
- Index = 1
- Left = 60
- TabIndex = 40
- Top = 540
- Value = -1 'True
- Width = 852
- End
- Begin OptionButton btnTextPosV
- Caption = "Top"
- Height = 252
- Index = 0
- Left = 60
- TabIndex = 39
- Top = 300
- Width = 732
- End
- End
- Begin Label Label15
- Alignment = 1 'Right Justify
- Caption = "H:"
- Height = 252
- Left = 840
- TabIndex = 52
- Top = 852
- Width = 252
- End
- Begin Label Label14
- Alignment = 1 'Right Justify
- Caption = "T:"
- Height = 252
- Left = 60
- TabIndex = 50
- Top = 852
- Width = 192
- End
- Begin Label Label13
- Alignment = 1 'Right Justify
- Caption = "W:"
- Height = 252
- Left = 840
- TabIndex = 48
- Top = 492
- Width = 252
- End
- Begin Label Label12
- Alignment = 1 'Right Justify
- Caption = "L:"
- Height = 252
- Left = 60
- TabIndex = 46
- Top = 492
- Width = 192
- End
- End
- Begin CommandButton btnShapeSelect
- Caption = "Set"
- Height = 288
- Left = 7320
- TabIndex = 32
- Top = 60
- Width = 612
- End
- Begin ComboBox cmbItemGraphic
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 288
- Left = 5220
- Style = 2 'Dropdown List
- TabIndex = 31
- Top = 420
- Width = 2052
- End
- Begin CommandButton btnGraphicSelect
- Caption = "Set"
- Height = 288
- Left = 7320
- TabIndex = 30
- Top = 420
- Width = 612
- End
- Begin ComboBox cmbShapeStyle
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 288
- Left = 5220
- Style = 2 'Dropdown List
- TabIndex = 27
- Top = 780
- Width = 2712
- End
- Begin Frame Frame1
- Caption = "Colors"
- Height = 1092
- Left = 60
- TabIndex = 20
- Top = 2880
- Width = 1812
- Begin PictureBox pctItemTextColor
- BackColor = &H00000000&
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 120
- ScaleHeight = 168
- ScaleWidth = 168
- TabIndex = 23
- Top = 780
- Width = 192
- End
- Begin PictureBox pctItemFillColor
- BackColor = &H0000FFFF&
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 120
- ScaleHeight = 168
- ScaleWidth = 168
- TabIndex = 22
- Top = 540
- Width = 192
- End
- Begin PictureBox pctItemBorderColor
- BackColor = &H00C0C0C0&
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 120
- ScaleHeight = 168
- ScaleWidth = 168
- TabIndex = 21
- Top = 300
- Width = 192
- End
- Begin Label Label7
- Caption = "ItemTextColor"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 360
- TabIndex = 26
- Top = 780
- Width = 1212
- End
- Begin Label Label8
- Caption = "ItemFillColor"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 360
- TabIndex = 25
- Top = 540
- Width = 1092
- End
- Begin Label Label9
- Caption = "ItemBorderColor"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 360
- TabIndex = 24
- Top = 300
- Width = 1392
- End
- End
- Begin ListBox lstTargets
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 600
- Left = 2040
- Sorted = -1 'True
- TabIndex = 19
- Top = 2220
- Width = 1932
- End
- Begin ListBox lstSources
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 600
- Left = 60
- Sorted = -1 'True
- TabIndex = 18
- Top = 2220
- Width = 1932
- End
- Begin CommonDialog CMDialog1
- CancelError = -1 'True
- Filter = "All Picture FIles|*.bmp;*.wmf;*.ico;*.dib|Bitmaps(*.bmp;*.dib)|*.bmp;*.dib|Metafiles(*.wmf)|*.wmf|Icons(*.ico)|*.ico|All Files(*.*)|*.*"
- FilterIndex = 1
- Flags = 4100
- Left = 2220
- Top = 3600
- End
- Begin ComboBox cmbItemShape
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 288
- Left = 5220
- Style = 2 'Dropdown List
- TabIndex = 15
- Top = 60
- Width = 2052
- End
- Begin TextBox edtItemXpos
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 360
- Left = 1080
- TabIndex = 11
- TabStop = 0 'False
- Top = 1200
- Width = 852
- End
- Begin TextBox edtItemYpos
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 360
- Left = 3120
- TabIndex = 10
- Top = 1200
- Width = 852
- End
- Begin TextBox edtItemData
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 360
- Left = 3120
- TabIndex = 8
- Top = 840
- Width = 852
- End
- Begin TextBox edtItemId
- Enabled = 0 'False
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 360
- Left = 1080
- TabIndex = 6
- TabStop = 0 'False
- Top = 840
- Width = 852
- End
- Begin CommandButton cmdAccept
- Caption = "&Accept"
- Default = -1 'True
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "System"
- FontSize = 9.6
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 372
- Left = 5940
- TabIndex = 4
- TabStop = 0 'False
- Top = 3960
- Width = 972
- End
- Begin CommandButton cmdDelete
- Caption = "&Delete"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "System"
- FontSize = 9.6
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 372
- Left = 4920
- TabIndex = 3
- TabStop = 0 'False
- Top = 3960
- Width = 972
- End
- Begin TextBox edtList
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 780
- Left = 1080
- MultiLine = -1 'True
- TabIndex = 2
- Top = 60
- Width = 2892
- End
- Begin CommandButton cmdCancel
- Cancel = -1 'True
- Caption = "&Cancel"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "System"
- FontSize = 9.6
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 372
- Left = 6960
- TabIndex = 0
- TabStop = 0 'False
- Top = 3960
- Width = 972
- End
- Begin Label Label21
- Alignment = 1 'Right Justify
- Caption = "ItemHeight:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2160
- TabIndex = 71
- Top = 1620
- Width = 912
- End
- Begin Label Label20
- Alignment = 1 'Right Justify
- Caption = "ItemWidth:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 120
- TabIndex = 70
- Top = 1620
- Width = 912
- End
- Begin Label Label11
- Alignment = 1 'Right Justify
- Caption = "ItemGraphic:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 4080
- TabIndex = 29
- Top = 480
- Width = 1092
- End
- Begin Label Label10
- Alignment = 1 'Right Justify
- Caption = "GraphicStyle:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 4020
- TabIndex = 28
- Top = 840
- Width = 1152
- End
- Begin Label lblTargets
- Caption = "Targets:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 252
- Left = 2040
- TabIndex = 17
- Top = 1980
- Width = 1752
- End
- Begin Label lblSources
- Caption = "Sources:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 252
- Left = 60
- TabIndex = 16
- Top = 1980
- Width = 1752
- End
- Begin Label Label6
- Alignment = 1 'Right Justify
- Caption = "ItemShape:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 4200
- TabIndex = 14
- Top = 120
- Width = 972
- End
- Begin Label Label5
- Alignment = 1 'Right Justify
- Caption = "ItemXpos:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 180
- TabIndex = 13
- Top = 1260
- Width = 852
- End
- Begin Label Label4
- Alignment = 1 'Right Justify
- Caption = "ItemYpos:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2220
- TabIndex = 12
- Top = 1260
- Width = 852
- End
- Begin Label Label3
- Alignment = 1 'Right Justify
- Caption = "ItemData:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 2220
- TabIndex = 9
- Top = 900
- Width = 852
- End
- Begin Label Label2
- Alignment = 1 'Right Justify
- Caption = "ItemId:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 180
- TabIndex = 7
- Top = 900
- Width = 852
- End
- Begin Label txtListIndex
- Caption = "ListIndex"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 252
- Left = 2760
- TabIndex = 5
- Top = 3660
- Visible = 0 'False
- Width = 792
- End
- Begin Label Label1
- Alignment = 1 'Right Justify
- Caption = "List:"
- FontBold = -1 'True
- FontItalic = 0 'False
- FontName = "Arial"
- FontSize = 7.8
- FontStrikethru = 0 'False
- FontUnderline = 0 'False
- Height = 192
- Left = 180
- TabIndex = 1
- Top = 120
- Width = 852
- End
- Sub btnGraphicSelect_Click ()
- Dim ix%, graphicIx%
- ix = Val(txtListIndex)
- frmPlayground!ITGraph1.GraphicSelect = cmbItemGraphic.ListIndex
- graphicIx = frmPlayground!ITGraph1.GraphicSelect
- If graphicIx >= 0 Then
- Call LoadGraphicNames
- cmbItemGraphic.ListIndex = graphicIx
- End If
- End Sub
- Sub btnShapeSelect_Click ()
- Dim ix%, shapeIx%
- ix = Val(txtListIndex)
- frmPlayground!ITGraph1.ShapeSelect = cmbItemShape.ListIndex
- shapeIx = frmPlayground!ITGraph1.ShapeSelect
- If shapeIx >= 0 Then
- cmbItemShape.ListIndex = shapeIx
- End If
- End Sub
- Sub cmdAccept_Click ()
- Dim ix%, textPos%, graphicPos%
- If txtListIndex.Caption = "" Then
- frmPlayground!ITGraph1.AddItem edtList.Text
- ix = frmPlayground!ITGraph1.NewIndex
- Else
- ix = Val(txtListIndex.Caption)
- frmPlayground!ITGraph1.List(ix) = edtList.Text
- End If
- frmPlayground!ITGraph1.ItemDrawLabel(ix) = chkItemDrawLabel.Value
- frmPlayground!ITGraph1.ItemData(ix) = Val(edtItemData.Text)
- If edtItemXpos.Text <> "" Then
- frmPlayground!ITGraph1.ItemXpos(ix) = Val(edtItemXpos.Text)
- End If
- If edtItemYpos.Text <> "" Then
- frmPlayground!ITGraph1.ItemYpos(ix) = Val(edtItemYpos.Text)
- End If
- If edtItemWidth.Text <> "" Then
- frmPlayground!ITGraph1.ItemWidth(ix) = Val(edtItemWidth.Text)
- End If
- If edtItemHeight.Text <> "" Then
- frmPlayground!ITGraph1.ItemHeight(ix) = Val(edtItemHeight.Text)
- End If
- frmPlayground!ITGraph1.ItemShape(ix) = cmbItemShape.ListIndex
- frmPlayground!ITGraph1.ItemBorderColor(ix) = pctItemBorderColor.BackColor
- frmPlayground!ITGraph1.ItemFillColor(ix) = pctItemFillColor.BackColor
- frmPlayground!ITGraph1.ItemTextColor(ix) = pctItemTextColor.BackColor
- frmPlayground!ITGraph1.ItemLabelLeft(ix) = Val(txtItemTextLeft.Text)
- frmPlayground!ITGraph1.ItemLabelWidth(ix) = Val(txtItemTextWidth.Text)
- frmPlayground!ITGraph1.ItemLabelTop(ix) = Val(txtItemTextTop.Text)
- frmPlayground!ITGraph1.ItemLabelHeight(ix) = Val(txtItemTextHeight.Text)
- textPos = 0
- For i = 0 To 2
- If btnTextPosH(i).Value Then
- textPos = textPos + i
- End If
- If btnTextPosV(i).Value Then
- textPos = textPos + 3 * i
- End If
- Next i
- frmPlayground!ITGraph1.ItemLabelAlign(ix) = textPos
- frmPlayground!ITGraph1.ItemGraphic(ix) = cmbItemGraphic.ListIndex
- frmPlayground!ITGraph1.ItemGraphicStyle(ix) = cmbShapeStyle.ListIndex
- frmPlayground!ITGraph1.ItemGraphicLeft(ix) = Val(txtItemGraphicLeft.Text)
- frmPlayground!ITGraph1.ItemGraphicWidth(ix) = Val(txtItemGraphicWidth.Text)
- frmPlayground!ITGraph1.ItemGraphicTop(ix) = Val(txtItemGraphicTop.Text)
- frmPlayground!ITGraph1.ItemGraphicHeight(ix) = Val(txtItemGraphicHeight.Text)
- graphicPos = 0
- For i = 0 To 2
- If btnGraphicPosH(i).Value Then
- graphicPos = graphicPos + i
- End If
- If btnGraphicPosV(i).Value Then
- graphicPos = graphicPos + 3 * i
- End If
- Next i
- frmPlayground!ITGraph1.ItemGraphicAlign(ix) = graphicPos
- frmPlayground.Enabled = True
- frmItemProperties.Hide
- End Sub
- Sub cmdCancel_Click ()
- frmPlayground.Enabled = True
- frmItemProperties.Hide
- Unload Me
- End Sub
- Sub cmdDelete_Click ()
- frmPlayground!ITGraph1.RemoveItem Val(txtListIndex)
- frmPlayground.Enabled = True
- frmItemProperties.Hide
- End Sub
- Sub edtList_Change ()
- If edtList.Text = "" Then
- cmdAccept.Enabled = False
- Else
- cmdAccept.Enabled = True
- End If
- End Sub
- Sub Form_Activate ()
- Dim ix%
- Call LoadShapeNames
- Call LoadGraphicNames
- If txtListIndex.Caption = "" Then
- Me.Caption = "New Item Properties"
- edtList.Text = ""
- chkItemDrawLabel.Value = 1
- edtItemId.Text = "????"
- edtItemData.Text = "0"
- edtItemXpos.Text = ""
- edtItemYpos.Text = ""
- edtItemWidth = CStr(frmPlayground!ITGraph1.XSpan)
- edtItemHeight = CStr(frmPlayground!ITGraph1.YSpan)
- cmbItemShape.ListIndex = ITG_ShapeDefault
- pctItemBorderColor.BackColor = frmPlayground!ITGraph1.ForeColor
- pctItemFillColor.BackColor = frmPlayground!ITGraph1.FillColor
- pctItemTextColor.BackColor = frmPlayground!ITGraph1.ForeColor
- lblSources = "Sources: 0"
- lblTargets = "Targets: 0"
- lstSources.Clear
- lstTargets.Clear
- txtItemTextLeft = "0"
- txtItemTextWidth = "0"
- txtItemTextTop = "0"
- txtItemTextHeight = "0"
- btnTextPosH(1).Value = True
- btnTextPosV(1).Value = True
- txtItemGraphicLeft = "0"
- txtItemGraphicWidth = "0"
- txtItemGraphicTop = "0"
- txtItemGraphicHeight = "0"
- btnGraphicPosH(1).Value = True
- btnGraphicPosV(1).Value = True
- cmbShapeStyle.ListIndex = ITG_SSFill
- cmdDelete.Visible = False
- cmdAccept.Enabled = False
- Else
- ix = Val(txtListIndex.Caption)
- Me.Caption = "Properties for Item " & Format$(ix + 1) & " of " & Format$(frmPlayground!ITGraph1.ListCount)
- edtList.Text = frmPlayground!ITGraph1.List(ix)
- chkItemDrawLabel.Value = Abs(frmPlayground!ITGraph1.ItemDrawLabel(ix))
- edtItemId.Text = Format$(frmPlayground!ITGraph1.ItemId(ix))
- edtItemData.Text = Format$(frmPlayground!ITGraph1.ItemData(ix))
- edtItemXpos.Text = Format$(frmPlayground!ITGraph1.ItemXpos(ix))
- edtItemYpos.Text = Format$(frmPlayground!ITGraph1.ItemYpos(ix))
- edtItemWidth.Text = Format$(frmPlayground!ITGraph1.ItemWidth(ix))
- edtItemHeight.Text = Format$(frmPlayground!ITGraph1.ItemHeight(ix))
- cmbItemGraphic.ListIndex = frmPlayground!ITGraph1.ItemGraphic(ix)
- cmbItemShape.ListIndex = frmPlayground!ITGraph1.ItemShape(ix)
- frmPlayground!ITGraph1.QueryItem = ix
- frmPlayground!ITGraph1.QueryState = ITG_QueryGetSources
- lblSources = "Sources: " & Format$(frmPlayground!ITGraph1.QueryCount)
- lstSources.Clear
- While frmPlayground!ITGraph1.QueryState
- lstSources.AddItem (frmPlayground!ITGraph1.List(frmPlayground!ITGraph1.ConnectFromIndex))
- lstSources.ItemData(lstSources.NewIndex) = frmPlayground!ITGraph1.ConnectFromIndex
- frmPlayground!ITGraph1.QueryState = ITG_QueryIterate
- Wend
- frmPlayground!ITGraph1.QueryItem = ix
- frmPlayground!ITGraph1.QueryState = ITG_QueryGetTargets
- lblTargets = "Targets: " & Format$(frmPlayground!ITGraph1.QueryCount)
- lstTargets.Clear
- While frmPlayground!ITGraph1.QueryState
- lstTargets.AddItem (frmPlayground!ITGraph1.List(frmPlayground!ITGraph1.ConnectToIndex))
- lstTargets.ItemData(lstTargets.NewIndex) = frmPlayground!ITGraph1.ConnectToIndex
- frmPlayground!ITGraph1.QueryState = ITG_QueryIterate
- Wend
- If frmPlayground!ITGraph1.ItemBorderColor(ix) <> -1 Then
- pctItemBorderColor.BackColor = frmPlayground!ITGraph1.ItemBorderColor(ix)
- Else
- pctItemBorderColor.BackColor = frmPlayground!ITGraph1.ForeColor
- End If
- If frmPlayground!ITGraph1.ItemFillColor(ix) <> -1 Then
- pctItemFillColor.BackColor = frmPlayground!ITGraph1.ItemFillColor(ix)
- Else
- pctItemFillColor.BackColor = frmPlayground!ITGraph1.FillColor
- End If
- If frmPlayground!ITGraph1.ItemTextColor(ix) <> -1 Then
- pctItemTextColor.BackColor = frmPlayground!ITGraph1.ItemTextColor(ix)
- Else
- pctItemTextColor.BackColor = frmPlayground!ITGraph1.ForeColor
- End If
- txtItemTextLeft = Format$(frmPlayground!ITGraph1.ItemLabelLeft(ix))
- txtItemTextWidth = Format$(frmPlayground!ITGraph1.ItemLabelWidth(ix))
- txtItemTextTop = Format$(frmPlayground!ITGraph1.ItemLabelTop(ix))
- txtItemTextHeight = Format$(frmPlayground!ITGraph1.ItemLabelHeight(ix))
- btnTextPosH(frmPlayground!ITGraph1.ItemLabelAlign(ix) Mod 3).Value = True
- btnTextPosV(frmPlayground!ITGraph1.ItemLabelAlign(ix) \ 3).Value = True
- txtItemGraphicLeft = Format$(frmPlayground!ITGraph1.ItemGraphicLeft(ix))
- txtItemGraphicWidth = Format$(frmPlayground!ITGraph1.ItemGraphicWidth(ix))
- txtItemGraphicTop = Format$(frmPlayground!ITGraph1.ItemGraphicTop(ix))
- txtItemGraphicHeight = Format$(frmPlayground!ITGraph1.ItemGraphicHeight(ix))
- btnGraphicPosH(frmPlayground!ITGraph1.ItemGraphicAlign(ix) Mod 3).Value = True
- btnGraphicPosV(frmPlayground!ITGraph1.ItemGraphicAlign(ix) \ 3).Value = True
- cmbShapeStyle.ListIndex = frmPlayground!ITGraph1.ItemGraphicStyle(ix)
- cmdDelete.Visible = True
- cmdAccept.Enabled = True
- End If
- edtList.SetFocus
- End Sub
- Sub Form_Load ()
- cmbShapeStyle.Clear
- cmbShapeStyle.AddItem "ITG_GraphicNone"
- cmbShapeStyle.AddItem "ITG_GraphicIconFill"
- cmbShapeStyle.AddItem "ITG_GraphicIconFillIso"
- cmbShapeStyle.AddItem "ITG_GraphicShapeFill"
- cmbShapeStyle.AddItem "ITG_GraphicShapeFillIso"
- End Sub
- Sub LoadGraphicNames ()
- cmbItemGraphic.Clear
- For i = 0 To frmPlayground!ITGraph1.GraphicCount - 1
- cmbItemGraphic.AddItem frmPlayground!ITGraph1.GraphicName(i)
- Next i
- cmbItemGraphic.ListIndex = 0
- End Sub
- Sub LoadShapeNames ()
- cmbItemShape.Clear
- For i = 0 To frmPlayground!ITGraph1.ShapeCount - 1
- cmbItemShape.AddItem frmPlayground!ITGraph1.ShapeName(i)
- Next i
- cmbItemShape.ListIndex = 1
- End Sub
- Sub lstSources_DblClick ()
- If frmPlayground!ITGraph1.DrawScale = 0 Then
- frmPlayground!ITGraph1.DrawScale = 100
- End If
- frmPlayground!ITGraph1.SelectRectLeft = frmPlayground!ITGraph1.ItemXpos(lstSources.ItemData(lstSources.ListIndex))
- frmPlayground!ITGraph1.SelectRectTop = frmPlayground!ITGraph1.ItemYpos(lstSources.ItemData(lstSources.ListIndex))
- frmPlayground!ITGraph1.SelectRectWidth = frmPlayground!ITGraph1.ItemWidth(lstSources.ItemData(lstSources.ListIndex))
- frmPlayground!ITGraph1.SelectRectHeight = frmPlayground!ITGraph1.ItemHeight(lstSources.ItemData(lstSources.ListIndex))
- frmPlayground!ITGraph1.ZoomSelectRect = 0
- frmPlayground.Enabled = True
- frmItemProperties.Hide
- End Sub
- Sub lstTargets_DblClick ()
- If frmPlayground!ITGraph1.DrawScale = 0 Then
- frmPlayground!ITGraph1.DrawScale = 100
- End If
- frmPlayground!ITGraph1.SelectRectLeft = frmPlayground!ITGraph1.ItemXpos(lstTargets.ItemData(lstTargets.ListIndex))
- frmPlayground!ITGraph1.SelectRectTop = frmPlayground!ITGraph1.ItemYpos(lstTargets.ItemData(lstTargets.ListIndex))
- frmPlayground!ITGraph1.SelectRectWidth = frmPlayground!ITGraph1.ItemWidth(lstTargets.ItemData(lstTargets.ListIndex))
- frmPlayground!ITGraph1.SelectRectHeight = frmPlayground!ITGraph1.ItemHeight(lstTargets.ItemData(lstTargets.ListIndex))
- frmPlayground!ITGraph1.ZoomSelectRect = 0
- frmPlayground.Enabled = True
- frmItemProperties.Hide
- End Sub
- Sub pctItemBorderColor_Click ()
- Const CC_RGBINIT = &H1&
- On Error GoTo pctItemBorderColor_Error
- CMDialog1.Color = pctItemBorderColor.BackColor
- CMDialog1.Flags = CC_RGBINIT
- CMDialog1.Action = 3
- pctItemBorderColor.BackColor = CMDialog1.Color
- pctItemBorderColor_Error:
- Exit Sub
- End Sub
- Sub pctItemFillColor_Click ()
- Const CC_RGBINIT = &H1&
- On Error GoTo pctItemFillColor_Error
- CMDialog1.Color = pctItemFillColor.BackColor
- CMDialog1.Flags = CC_RGBINIT
- CMDialog1.Action = 3
- pctItemFillColor.BackColor = CMDialog1.Color
- pctItemFillColor_Error:
- Exit Sub
- End Sub
- Sub pctItemTextColor_Click ()
- Const CC_RGBINIT = &H1&
- On Error GoTo pctItemTextColor_Error
- CMDialog1.Color = pctItemTextColor.BackColor
- CMDialog1.Flags = CC_RGBINIT
- CMDialog1.Action = 3
- pctItemTextColor.BackColor = CMDialog1.Color
- pctItemTextColor_Error:
- Exit Sub
- End Sub
-